<template>
	<fs-page class="PageFeatureSearchMulti">
		<fs-crud ref="crudRef" v-bind="crudBinding">
			<template #cell_url="scope">
				<el-tag size="small">{{ scope.row.url }}11</el-tag>
			</template>
			<!-- 注释编号: django-vue3-admin-index442216: -->
			<!-- 注释编号:django-vue3-admin-index39263917:代码开始行-->
			<!--  功能说明:使用导入组件，并且修改api地址为当前对应的api，当前是demo的api="api/CrudDemoModelViewSet/"-->
			<template #actionbar-right>
				<importExcel api="api/CrudDemoModelViewSet/" v-auth="'user:Import'">导入</importExcel>
			</template>
			<!--  注释编号:django-vue3-admin-index263917:代码结束行-->
		</fs-crud>
	</fs-page>
</template>

<script lang="ts" name="CrudDemoModelViewSet" setup>
import { onMounted, getCurrentInstance} from 'vue';
import { useFs } from '@fast-crud/fast-crud';
import createCrudOptions  from './crud';

// 注释编号: django-vue3-admin-index192316:导入组件
import importExcel from '/@/components/importExcel/index.vue';

const instance = getCurrentInstance();
const context: any = {
	componentName: instance?.type.name
};

const { crudBinding, crudRef, crudExpose, resetCrudOptions } = useFs({ createCrudOptions, context});  

console.log('instance=====', instance)

// 页面打开后获取列表数据
onMounted(() => {
	crudExpose.doRefresh();
});

</script>